added the latest code for the protocolmanager
Merge pull request #700 from RoanKanninga/master

added the latest code for the protocolmanager