added hyperperiod, fixed some bugs