modified CSG1132 lecture notes