intelligent algorith is good to have a look at and working fine as of now.