50% swap implementation
addtoclear function
merge