wasn't iterating over khash correctly