Switched to algorithm and sorted the citations.