thoughout, I had to add as.character to the subset function becuase of unused factor levels