update format function demo