fixed counting of documents
added subsidiary course id