new version with loadData working