index.js template named functions

for easier debugging