final hw + minor corrections