updated rank.py to output the original json + a rank field containing that elements rank