added methods to parser to allow single-message parsing