add more Cluster management code and unti test