more work on viewer