modified CSI1241 lecture notes