resize global span when text lenght changes, add getText() and toString() to piece