Begin template for K mean