added: sum function in utils.h