simplify transition logic