Sample with parameters.