finished Rjson output script, will knit it into the code base tmr