added function to convert from base 10 to any other base