Adding slicing
Merge pull request #24 from tpetricek/master

Adding sampling