rearranged a bit