added input at the end to prevent the window from closing