Tiny change to use a set instead of conditionals