added RPI calculation