Thanks for the answer!, I'm working on some changes to the algorithm according to your comments, as soon as possible you will see them.