changed visualisation code