add visualization in java code