cleaned up weighting in process_pair (core.py)