https://courses.grainger.illinois.edu/cs524/fa2020/lecture3a.pdf