working random deep traversal of the image