clustering and mean working