fixed categrorize to handle non-int labels