add Document class, its render method is still hard coded