simplify boolean return function