some minor noob refactoring