update k means, bug needs to be found