updated parser code