adjust js to accept new json