First implementation of sum, will not work now.