Updated example code and added kmedioids function