added validation block