get_bt_vars function written well