registration function implemented
moved global.php to root directory to avoid including errors