handle validity conditionals