Added option-tree and advance in functions