trying to pass url as a function