add calculate sum() and average avg()

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
add tests for sum() and avg()

Signed-off-by: Trevor Norris <trev.norris@gmail.com>