working on lecture 3 and hw2