model loadData function