removed cwd and passed varibables in to template