Rewrote parse_amount