debugging json logic