implement weighted sampling methods