Added method to collect data