On endomorphism rings of primary abelian groups