added json retrieval to frontend