add two function
merge index.php