replace strcpy by strncpy