more efficient hash for sets