changed a function in handle_request()