Added pred fucntion to binary tree