refactored main.html