compilation of pkmeans