refactored BT stuff