added memory and correct string concat