attempting to change ranking procedure... demo2.py does most of the work for now. will change.