Added visualization code to notebook, but visualization is buggy