You can also put this method inside of the function calling it, reducing its visibility and making decodeMessage looking more side-effect free