add alive and destroy
refactor view with query selector