working on hw4, posted solution to hw3