Updates to finish algorithm to reversing string.