use memcpy which should be faster than strcat