making changes to the modal.js file to pass  instead of using it globaly