added the de-bounce version of edge detect