Finished homework2