before writing visualization