renamed and updated url constructor