Added code to decode the value field of events