Finished homework3