Adding local detection