added validation to lab1