added strdup, strndup