0) - add thread functions for bitree