Shortening string code