clustering and reducing dimesions fully done