Implemented method sum
Final version, now all is fine