optimization for composing strings