fixed ajax calls and parsing