adding a method to fetch the data, process and get the statistics