use modal function to hide