move env to end of lines