rearranged and documented everything