make logic more readable thanks to short circuit