working version of hw2