added implementation of operators (some) and branching