implemented connect() for Node module