more work on detection