decided to write clustering in C