added some utility functions to binary search tree and linked list