small refactor
some more minor refactoring
more minor refactoring