move sort implementation
rename append_child -> insert