format function cmplete function and change return value