private bool IsOperator(string s)
{
for(int i = 0; i < operatorsPriority.Count; i++) {
if(operators[operatorsPriority[i]].Equals(s)) {
// bring in front of the list
if(i != 0) {
int temp = operatorsPriority[i];
operatorsPriority.RemoveAt(i);
operatorsPriority.Insert(0, temp);
}
return true;
}
}
// not found
return false;
}