updated parser to deal with negative weights and priorities