functinalities for index.php