created algorithm for postfix evaluation