moved convertString function