added function to get employees by type
a whole bunch of stuff