Control of morphology and electromagnetic properties of polypyrrole synthesized by the template method