Check for boundaries