added loop to print through student names