added side restriction for binary tree border query