Added in data gathering code