lecture notes for cs 8218267