Characterization and switching of thin poly-N- methylpyrrole films