Added method to retrieve names and output to ejs file

Getting the names and outputting them to ejs file