visualizing some algorithm