added students array outside of methods and made it instance variable