Completed hw2.sml