change $connect to public