merge: remove global variable head[]