updating es5 object to have sum function to add groups together