adds animation effects for smoother transitions