changed tj_id into d_id