function on cancel

cancelling the modal can now run a function that is passed in as the 3rd parameter