Understanding and Implementing Acceptance Sampling