updated getConnection to include ssl settings