Let $G$ be a group such that all of its subgroups are normal, prove that $[G,G]\subset Z_G$ where $[G,G]$ is the subgroup generated by the commutators $[G,G]=\langle [g,h]: g,h \in G\rangle \;$ where $[g,h]=ghg^{-1}h^{-1}$ and $Z_G$ is the center of $G$ $Z_G=\{g \in G : (\forall x \in G)gx=xg\}.$
I tried fixing $x\in G$ and tried proving that all commutators commutate with $x$. Doing this will show that the set of all commutators is a subset of the center, and thus the group generated by the commutators is a subgroup of the center.
Let us consider $\langle x\rangle$, if it is normal, then $yxy^{-1}=x^{\gamma(y)}$; then the we have that $\gamma:y\mapsto\gamma(y)$ is such that $\gamma(y_1y_2)=\gamma(y_1)\gamma(y_2)$
Then for any commutator $c=ghg^{-1}h^{-1}$ we have $cxc^{-1}=ghg^{-1}h^{-1}xhgh^{-1}g^{-1}=x^{\gamma(ghg^{-1}h^{-1})}=x^{\gamma(g)\gamma(h)\gamma(g^{-1})\gamma(h^{-1})}=x^{\gamma(gg^{-1})\gamma(hh^{-1})}=x^{\gamma(e)\gamma(e)}=x$$cxc^{-1}=x \Longrightarrow cx=xc$
Is it correct? Are there any more elegant methods? In my proof the fact that $\gamma:G\rightarrow Z/nZ$ is not an homomorphism is giving me some trouble, although everything seems to work.