connecting peers partially implemented. several bug fixes