added feature detection code