update doc and add missing return value