rearrange order of some declarations