added scrollString and a function to calculate the length of a string