Refactoring: use 'in' instead of 'or' condition