Notes for CS246