Add code to calculate frequency of assignment