more refactoring
more refactoring and organization