Modifying the algorithm for fetching data. Adding web viewer