Rearrange code
Rearrange code