Add support for sampling method that accepts parameters