add viewer source code