array.sample cleanup