implemented data collection with period, not tested