progress on make_principal.php