added an if statement to student management