+ added sum function