tested centoid methods. all function.