fixed multiple addition of adjacent values