Finished homework4