-

some useful algorithm