finish the post fucntion