cleaned up transition logic

there may be future optimizations