Finished homework assignment 1