moved database import to very end