Updated to work with bluetooth