rearrange code and file