commented algorithm, fixed image source from random to zeros