Rearranging sequence of execution