Added convertBase method.