added json parsing and mock API