refactored employee search and added test of it