ejs templates and grouped By semi working