Add test code to calculate frequency of assignment