Further added function to getting data and loading