Implemented the subset generator
Written tests for subset generator