Adding update and location url. refactor