update doc for format function