fixing tic/toc in kmeans and logreg