refactoring stuff
more refactoring