moved test code for visualisation into test file