solve homework2.2