optional error
optional result
expanded protocol
added a JSON helper