improve request validation