supports precondition, add basic conditions, add json factory