visualize function moved to sim class