Replaced `value` with `operator` to avoid rewriting the value of `value`.
Fixed the missing brackets. Expanded one-liner function.