update difficulty detection algolithm.