refactor, actually error invalid things