A DISTANCE BASED CLUSTERING ALGORITHM