add support for different protocols
Merge pull request #29 from saz/protocol_support

add support for different protocols