make revers string working