My edited version for bluetooth