First attempt at frequency.py