Add frequency option

closes #3. seems to be feature-complete, but could definitely use some refactoring.
Definitely, this is the part that I was specifically thinking about refactoring.