cleaned up rpn