added prime and corrected rpn