Adding string reversal to recreate strrev function