added it so it uses each with index and also only prints students with a name starting with a