added a protocol and python master code