Here is a quick primer: http://chenkinworkshop.blogspot.com/2018/02/is-there-simple-way-to-detect-if-your.html