for generating several frequencies