updated code for new url service