add function to convert base and fold to do the same