frequency calcs working