refactoring - created three methods, then calling the methods and passing through the students array as the argument