hw2p2 partial function!