Added threading to the get_data