Add support for multiple samples