implemented binary tree for expressions