Don't return query in url function
Create necessary replace statements