Switch to K-medians using 3rd party code