did warnings and changed strdup