impl add and remove magic
merge with head