python json and subprocess changes