allocation failure should return a boolean
added SearchFunction to DynamicTree