replace asprintf() for strdup()