updating rmain for json