minor refactoring to make data collection more consistent