rtt wip
tmp
rtt wip
fixed some bugs, refactored k-means