calculates rr and pc, hides data files in code