refactoring on html page