Added code from lecture 2 on 10/24