sorting out db locations