update new detection algorithm