implemented loadData function