update functionality to abstract urls to work both local and server side