updated rest for urls and ajax call