made modal smoother