Denote by G a finite group and let ψ(G) denote the sum of element orders in G. In 2009, H.Amiri, S.M.Jafarian Amiri and I.M.Isaacs proved that if |G| = n and G is non-cyclic, then ψ(G) < ψ(C n ), where C n denotes the cyclic group of order n. In 2018 we proved that if G is non-cyclic group of order n, then ψ(G) ≤ 7 11 ψ(C n ) and equality holds ifIn this paper we proved that equality holds if and only if n and G are as indicated above. Moreover we proved the following generalization of this result: Theorem 4. Let q be a prime and let G be a non-cyclic group of order n, with q being the least prime divisor of n. Then ψ(G) ≤ ((q 2 −1)q+1)(q+1) q 5 +1 ψ(C n ), with equality if and only if n = q 2 k with (k, q) = 1 and G = (C q × C q ) × C k . Notice that if q = 2, then ((q 2 −1)q+1)(q+1) q 5 +1 = 7 11 .