add support for 2 databases
more test cases