rewrite Factory and add base viewer