Copied the teacher's work as a starting point