KPK homework 7 & 8