adding a smoother animation