added main.php file and extended other classes to it