started working on loadData function