use memcpy instead of strcpy