working version and it actually detects something