Dokdrop Improve the algorithm

Add a suggestion