clean up
more refactoring