work on algorithm for citations.