remove boolean returning ternary expression