simplify handleRequests fn