rewrite method to print all students using until