material from lecture eleng 247a 1443854