added visualize functions and pics