fix identifier order and add operator precedence