implementing clustering algorithms / helpers in Julia