using versions instead of latest
adding callbacks to message types
implementing error as first arg in callbacks
adding test cases for callbacks