Added sync ajax method to retrieve data