Added ability to select database