have the detect function returning the locatoin of the object