modifed document class for testability