Add ability to change number and length of periods.