begin code for count_based_PVAs