employee test and little bit of refactoring