Small refacoring to abstract source and it's descendants to add
option to generate only given amount of samples