refactor html template