hw4+challenge finished, tested.