remake to json

and included status variable