clearer if() logic