added new testcode
added code for generic binary tree