some discord detect algorithm