added Viewer.java, taken from roflkode