changed js to match new json structure