Transitions added
Code optimized