updated to get connection