main now uses the knearest heatmap gen