check for existence of viewer in sim environment
merge check for viewer in environment