added db saving(saves over restart)