implement multiple samples