reuse mongo db instance, building api