added db fnc to init