Adding smooth transitions