db init functionality