Updated the base string algorithms