added validation for client