This is the other change: all the checks are in this function.