bitree implementation