refactor and modified html