replace strcat with memcpy to avoid segmentation