changed parameter of cmd metric, change maxsize of distance matrix