modified connect.sh