updated parser with tests