Pendant group effects on the optical and electrical properties of carbazole-diketopyrrolopyrrole copolymers