modified scarping code