Added the Sum optimization