clustering methods from Prof. Zeng