add 1s to delay to hide the modal