remove unnecessary ternary operator
update doc