Implemented decodeMessage()