make sure set contains strings
refactor