added validation for lessons