Random algorithm extention