refactorise in Visualisation.java