Made an independent set function, untested