I am working on a course so don't mind the messy code in here.