document frequencies working