working revstring