added some code to debug error in visualization'
'