Code that I wrote in university, you can use it if it's helpful to you. But remember it's terrible I wrote it when I was learning :)