default to empty input and handle no-input case correctly