rewrote wikidrain.class.php