init viewer