not detecting threshold