now catches empty input