added '~' key support for sets