got it working with multiple databases