https://www.vuinsider.com/2019/12/cs408-assignment-2-solution-fall-2019.html