only process non-empty input