converted the originla index.js into grunt task version