adaptation to new json, not finished yet