made the getRequests function