change KarPtr argument to reference