final version of RPN