added isBST method