remove last character of output