convert an amount