added code to get the number of variable sites