updated BT code