added new function to remove query parameters and return the new url