Update freq.cpp