improvements for viewer