Complite k-mean algorithm and modify interface