added hw10 plus some fixes to previous work