creating idb on start up