changed strdup to str_dup because it conflicts with POSIX string.h strdup on systems that have it