renamed sums to sum
added reallocarray.c for protability; chenged Makefile accordingly