added csv mode checkbox
made the subset length section of the code