rearrange & cleanup