rearranged bluetooth stack