got scrap to work and return json, need to add conditions