Finished with the base encoding function