slighlty better device detection