Finish homework5.1