Try to further simplify the logic