moved creation of variable creation to loaddata function