improve readability of an if statement