implemented rpn