Implemented Two-way protocol

Implemented Two-way protocol