refactor the impl with drop jade and use html as template