switch update, destroy hander need fix
refactor and fix bugs