moved data storage to factories