changed static parser variables to instance variables (avoid side effects)