some simple algorithm demo