Is this the simplest way to formulate the logic?