added support for visualization into the controller