test forEach in sum