Added realm argument to deal with PR variable existing within 3 separate realms