local db working