https://www.cs.princeton.edu/courses/archive/fall04/cos318/docs/netapp.pdf