created the new clustering function using suffix tree; need to correct compilation errors and to test