added isSafe()