working on json logic