added methods to parser and figure parser