fixed allocate memory bug in creation tree function, writen functions of binary operations