added some logic to get data from webpage