modified core.php