added validation and student retrieval functions