Source: https://home.cscamm.umd.edu/~jabin/intro2.pdf