sort out config and use of tp mongo client