rearranged some methods