added reversed array feature
made textToArray neater