some simple algorithm can use in our work