partial refactoring/clean up