Reversible redox switching in polypyrrole and poly-SNS films