added a parameterized factory method to create employees