Converted result callbacks to handle NSError
implemented Publish