generalize open modal window