change the order of these
change where we do the checks at