rearranged some behavior to appropriate classes