added tilde at the end, in-place
merged