refactored decodeCharacters method to no longer use the URLDecoder class