add test for viewer