A sample controller