minor refactoring / cleanup