updating changes to work with modal and multiple modals on one page