test and code refactoring