Add rpn calculator function