merge from bottom-up