changes in urls and fixes logic