renamed copy_str_to_heap to traditional strdup