added hw 8 code and writuep