added generics to BST