add some debugging code; add regex for handling no-space case