adds a function to calculate VR from longform data