first test and refactoring