refactor index.ejs