added validation hook