Further simplify the logic