Finish writing protocol. Has not been tested yet.