added frontend JSON parsing