Wrote the data gathering