modified the parseMessage() method, replacing the preg_replace() with preg_replace_callback(), because PHP 5.5 deprecated the /e modifier