added support for modal window behavior