refactor code
fix innerHTML
debug