make viewer work with id in querystring