moved sum into arguments of #solve_happiness