optimizations to transition logic