added ability to close modal from anywhere