visualisation moved from html to js