implement HKP, still needs testing