Rearrange my code