fix defaultFn
add root
fix collision assertion
refactor