created cond2linear, a function that bonds two particles randomly