moved data magic datastore to global variable