refactored gsomenu.php