Decoherence of coupled electron spins via nuclear spin dynamics in quantum dots