change the way to find database