Completed Homework3.