added hw 5, 6, 8