add support to multiple sample cases.

![71b15ece-6540-466f-93f5-0daa3f6ccdfa](https://f.cloud.github.com/assets/5453070/2246835/9b287f7c-9d68-11e3-899f-b3f0a50eaed4.png)