add modal exit functionality