finished preliminary work on hw4