fixed some typos
correctly handle frequencies