work on sml hw 6