reorganize demo.php