Improve the detect code