here's the final working code, minus the user interaction
Merge https://github.com/prazors/COMP1900
added final changes minus the user interaction