checking the correct device