lots of refactoring
lots of more refactoring