Dimer formation of viologen derivatives and their electrochromic properties