add better detection for url parameters