Add reservior sampling algorithm