Terminating Input code