finish writing gather_data()