Added alternative way to ajax