Changing order of logic