Folding of rocks is most likely to happen when rocks undergo