implemented the new while command with conditions and also fixed the input field disappears when the user enters 0