no idea about this algorithm..
:( 8)