update for type dom
fixed bugs
add some todo