modifying db access class, route and ejs