store input strings on heap