some progress with viewer functions