fixed bug in measureFrequency() - had no return value