- made sure that the connection is only returned for valid connections