sum cleanup and a working random delay implementation