changed to use json instead of xml