Tested to connect to database