added missing 2*pi*i to template phases