common function fetch employee