KPK / Code optimization v3