implemented visualization and many other changes for the last assignment