working on last problem of hw1