refactoring / cleanup