KPK / Code optimization v4