added code to test if bt is enabled