Add frequency option

closes #3. seems to be feature-complete, but could definitely use some refactoring.