bug fux: change arrays used1,used2 to one array used