implemented the request functionality