lift loop bodies in a method