data collection with lock in