add docs and rearrange order