moved custom functions into extras.php