First version of the Prank algoriths (withou test yet)