unary operator refactor