finish homework2 Q1 ~ Q5