process_data function

Process the data