added mock connect and connection