Added ability to connect to database