Origin of templating processes in polypyrrole synthesis