implemented my-frequencies and my-frequencies-helper functions