use new protocol in mllib/stat
refactor clustering