Added frequency field calculation