add operator factory + update tree structure + refactor