added subsidiary course id
fixed counting of documents