Revert a65b5c5..96ff716

This rolls back to commit a65b5c5138f9761700b81973eb4ee26eb53837bc.
added device detection

- still not working; trying to understand the problem