using load data from function