Finished hw3.1