some refactoring, more json status