made reveseToDecimalFormat method generic