sample handling