Update visualization helper funciton