https://courses.grainger.illinois.edu/ece486/fa2021/homework/assignments/hw4/hw04.pdf