Changed sum syntax as not working on heroku