Added method for recursive reverse