Density functional investigations on the C-C bond formation and cleavage in molecular batteries