added bad request handler