implement request handler.