change order of code