testing & refactoring