added a basic generic tree implementation