update format amount function