added frequency generator and tests #304