updated organize_data