better boolean recognition