completed beta diversity integration

beta diversity portion of the script is integrated and functional, only
fix was a small bug and switched coin and cmax as they were going in
the opposite rows