Implemented the getUsers() function