implemented validation of request