changed %d to %lu