adding ternary operator to filters