switched pairend_distro to python implementation