how i can call sum method in right way