refactor html work