Move one more function to core.php