added 'space' to state, to track whether it changes.