detect space