Completed hw3.sml