added random subset selection ability