Fix issue #4 (frequency parameter).
refactored tests.
Merge pull request #10 from antoinealb/frequency-parameter

Add a frequency parameter