implemented method to get users from api