add initial support for multiple databases