Changed from pointer to references in mps_to_rps