added ability to choose database