updating detect
fixing the detect and ignoring unecessary test for Event