added demo code from lecture 7