Electrical and optical properties of polythiophene prepared by electrochemical polymerization