could you move all of this to a method in CPVRManager