Functionalized polythiophene for corrosion inhibition and photovoltaic application