add new document class and layout, template class