fixes and rearrange