update if statement per @heff comment