convert functions.inc.php to class.core.php