added get URL function to queries.php