Refactored with arrays to comply with grade sheet